package com.xy.exam.Exception;


import com.xy.exam.web.ServiceCode;
import lombok.Getter;

public class ServiceException extends RuntimeException{

  /*  @Getter
    private ServiceCode state;
    public ServiceException() {
    }

    public ServiceException(ServiceCode serviceCode, String message) {
        super(message);
        this.state = serviceCode;
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }*/
    /**
     * 业务状态码
     */
    @Getter
    private ServiceCode serviceCode;

    public ServiceException(ServiceCode serviceCode, String message) {
        super(message);
        this.serviceCode = serviceCode;
    }

}
